package com.generalbackend.common.listener;

import com.generalbackend.common.util.SpringUtil;
import org.springframework.boot.context.event.ApplicationPreparedEvent;
import org.springframework.context.ApplicationListener;

/**
 * @author tim.xie
 * @date 2021/12/8 17:02
 */
public class MyApplicationListener implements ApplicationListener<ApplicationPreparedEvent> {
    @Override
    public void onApplicationEvent(ApplicationPreparedEvent event) {
        SpringUtil.setApplicationContext(event.getApplicationContext());
    }
}
